from concurrent.futures import ThreadPoolExecutor

def ThreadPool(fun,args):
    with ThreadPoolExecutor(max_workers=100) as thread:
        res = []
        for result in thread.map(fun, args):
            res.append(result)

        return res



